/**
 * ===========================================================================
 * 版权所有 湖南免了么网络科技有限公司，并保留所有权利。
 * 网站地址: http://www.mianle.me
 * ===========================================================================
 * 14:43 2018/6/26
 */
package com.mianle.userapi.service.task03;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: yiyuan
 * @Description:
 * @Date: Created in 14:43 2018/6/26
 *
 */
@Component
public class ProjectInit implements CommandLineRunner {

    @Autowired
    private DynamicTaskConfigurer dynamicTaskConfigurer;

    @Override
    public void run(String... strings) throws Exception {
        System.out.println("------------------------初始成功-----------------------");
//        List<TimingTask> tasks = new ArrayList<TimingTask>();
//        tasks.add(new TimingTask(2,"0/20 * * * * ?"));
//        System.out.println(dynamicTaskConfigurer);
//        dynamicTaskConfigurer.refreshTasks(tasks);
    }
}
